home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
progutil
/
iostream.zoo
/
editbuf.doc
next >
Wrap
Text File
|
1991-09-11
|
1KB
|
33 lines
editbuf: A String Buffer Package
The editbuf package is a set of C++ classes for manipulating
string buffers. A buffer is variable size, and is
implemented using the buffer-gap method used by Emacs;
it is therefore suitable for fairly heavy-duty operations.
You can create sub-strings of buffers (or sub-strings);
these are first-class values.
edit_streambuf
-------------
An edit_streambuf is a streambuf using an edit_string as its source/sink,
similar to a strstreambuf (but more powerful).
edit_streambuf::edit_streambuf(edit_string* str, int mode);
Construct a new edit_streambuf.
The mode can be the usual ios::open_mode bits.
Interpretation:
ios::in - Open for reading.
ios::out - Open for writing. If no other bits are
given, the string will be truncated when the streambuf
is closed: Everything between the current position
and the end of STR will then be deleted. This means
that the STR will be replaced by new data; however,
any existing marks into STR will still be meaningful
(instead of all being moved down to either end of STR).
ios::app - Actually open the empty string at
the end of STR. (NOT IMPLEMENTED).
ios::ate - Do a seek to the end immediately.
ios::trunc - Truncate string initially (at open).